package com.aididi.utils;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;

/**
 * @Auther: zx.xu
 * @Description:
 */
public class FastJsonConvertUtil {

    /**
     *
     * @param obj
     * @return  对象转json
     */
    public static String convertObjectToJson(Object obj){
        try {
            String text =  JSON.toJSONString(obj);
            return text;
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }
    }
}
